﻿<Application x:Class="eNursePHR.userInterfaceLayer.App"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
              xmlns:ui="clr-namespace:eNursePHR.userInterfaceLayer"

             
    StartupUri="WindowMain.xaml" 
    SessionEnding="Application_SessionEnding">
    <Application.Resources>

        <ui:RemoveParentesisOutcomeConceptConverter x:Key="RemoveParentesisOutcomeConceptConverter" />
        <ui:UpperCaseConverter x:Key="UpperCaseConverter" />

        
        <!-- Based on http://adoguy.com/2007/04/17/Changing_the_Selected_Style_of_ListBox_s_in_XAML.aspx, accessed 20 march 08-->
        <Style x:Key="GreenItemContainer"  TargetType="{x:Type ListViewItem}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type ListViewItem}">
                        <Border 
                    CornerRadius="8"
                    BorderThickness="1"
                    Background="White"
                    x:Name="IconBorder"
                    Margin="8,4,8,4"
                    Padding="5" >
                            <ContentPresenter />
                        </Border>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsSelected" Value="true">
                                <Setter TargetName="IconBorder" Property="BitmapEffect">
                                    <Setter.Value>
                                        <OuterGlowBitmapEffect GlowColor="Green"  GlowSize="8" />
                                    </Setter.Value>
                                </Setter>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>


        <!-- Annotation START -->
		<SolidColorBrush x:Key="DiseaseHighlightColor" Color="#54FF0000" />
		<SolidColorBrush x:Key="DiagnosisHighlightColor" Color="#54008000"/>
		<SolidColorBrush x:Key="InterventionHighlightColor" Color="#540000FF" />
		<SolidColorBrush x:Key="MedicationHighlightColor" Color="#54474747" />

    <!-- Annotation END -->
    
		<LinearGradientBrush x:Key="TagsBackground" EndPoint="0.5,1" StartPoint="0.5,0">
        		<GradientStop Color="#FF2100FF" Offset="0.17"/>
        		<GradientStop Color="#FFFFFFFF" Offset="1"/>
        	</LinearGradientBrush>
      
        <LinearGradientBrush x:Key="BlueTheme" EndPoint="1,0.5" StartPoint="0,0.5">
            <GradientStop Color="#FFF5F5F8" Offset="0"/>
            <GradientStop Color="#FF0038FB" Offset="1"/>
        </LinearGradientBrush>

        <SolidColorBrush x:Key="DiagnosisItem" Color="#FF18A618"/>

		<SolidColorBrush x:Key="DiseaseColor" Color="Red" />
		<SolidColorBrush x:Key="DiagnosisColor" Color="Green" />
		<SolidColorBrush x:Key="InterventionColor" Color="Blue" />
		<SolidColorBrush x:Key="MedicationColor" Color="#FF4E4E4E"/>
		<SolidColorBrush x:Key="CareComponentColor" Color="Magenta" />

		<LinearGradientBrush x:Key="InterventionItem" EndPoint="1,1" StartPoint="0,0">
            <GradientStop Color="Blue"  Offset="0"/>
            <GradientStop Color="#FF0800FF" Offset="1"/>
        </LinearGradientBrush>

        <LinearGradientBrush x:Key="ItemTitleBackground" EndPoint="1,0.5" StartPoint="0,0.5">
        	<GradientStop Color="#FF839B68" Offset="0"/>
        	<GradientStop Color="#FF839B68" Offset="1"/>
        	<GradientStop Color="#FFCEEBBA" Offset="0.495"/>
        </LinearGradientBrush>
        
    	<LinearGradientBrush x:Key="BrushCombinedDiagnosisIntervention" EndPoint="1,1" StartPoint="0,0">
    		<GradientStop Color="#FF469F47" Offset="0.094881122753976532"/>
    		<GradientStop Color="#FF38089B" Offset="1"/>
    	</LinearGradientBrush>
    	
    	<LinearGradientBrush x:Key="BrushFrameworkDiagnosis" EndPoint="0.5,1" StartPoint="0.5,0">
    		<GradientStop Color="#FF4BAF37" Offset="0.465"/>
    		<GradientStop Color="#FFFFFFFF" Offset="1"/>
    	</LinearGradientBrush>
    	
    	<LinearGradientBrush x:Key="BrushFrameworkCareComponent" EndPoint="0.5,1" StartPoint="0.5,0">
    		<GradientStop Color="#FFC12E73" Offset="0.5"/>
    		<GradientStop Color="#FFFFFFFF" Offset="1"/>
    	</LinearGradientBrush>
    	
    	<LinearGradientBrush x:Key="BrushFrameworkIntervention" EndPoint="1,0.5" StartPoint="0,0.5">
    		<GradientStop Color="#FF0041F8" Offset="0.485"/>
    		<GradientStop Color="#FFFFFFFF" Offset="1"/>
    	</LinearGradientBrush>
        
    	<SolidColorBrush x:Key="CarePlanTagsBackground" Color="#FFE7E1E1"/>
    	<SolidColorBrush x:Key="ItemTagsBackground" Color="#FF96ABE5"/>


        <!-- Observation : Had to move this template to the end of the resource section, maybe because resources
        are instatiated from top-down (got XamlParseError and resource CareComponentColor not found when template
        was on the top of resource section) -->
        
        <DataTemplate x:Key="CareComponentHeader">
            <TextBlock Text="{Binding Path=Name, Converter={StaticResource UpperCaseConverter}}" 
			FontSize="13"
			 FontWeight="UltraBold" 
			 HorizontalAlignment="Center" 
			 Foreground="{StaticResource CareComponentColor}"
			 />
        </DataTemplate>

    </Application.Resources>
</Application>
